package decorator.starbuzz;

import decorator.starbuzz.base.Beverage;
import decorator.starbuzz.concreteComponents.DarkRoast;
import decorator.starbuzz.concreteComponents.Espresso;
import decorator.starbuzz.condimentDecorator.Mocha;
import decorator.starbuzz.condimentDecorator.Whip;

public class StarbuzzDemo {

    private static void showBeverageInfo(Beverage beverage) {
        System.out.println(beverage.getDescription()+": CNY"+beverage.cost());

    }

    public static void main(String[] args) {

        // Espresso，不添加任何调料
        Beverage beverage0 = new Espresso();
        showBeverageInfo(beverage0);

        //DarkRoast
        Beverage beverage1 = new DarkRoast();
        beverage1 = new Mocha(beverage1);
        beverage1 = new Mocha(beverage1);
        beverage1 = new Whip(beverage1);
        showBeverageInfo(beverage1);

    }

}
